﻿using furion.blog.Domain.MySQL;
using furion.blog.Domain.Query.TagConfig;
using furion.blog.Domain.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace furion.blog.Domain.IRepositories
{
    /// <summary>
    /// 标签
    /// </summary>
    public interface ITagConfigRepository
    {
        /// <summary>
        /// 标签分页
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<PageVO> List(TagConfigListQuery query);

        /// <summary>
        /// 通过id查找
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<TagConfig> FindById(long id);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="tagConfig"></param>
        /// <returns></returns>
        Task<bool> Save(TagConfig tagConfig);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="tagConfig"></param>
        /// <returns></returns>
        Task<bool> Update(TagConfig tagConfig);

        /// <summary>
        /// 查询第一个
        /// </summary>
        /// <param name="exp"></param>
        /// <returns></returns>
        Task<TagConfig> First(Expression<Func<TagConfig, bool>> exp);

        /// <summary>
        /// 查询左右
        /// </summary>
        /// <param name="exp"></param>
        /// <returns></returns>
        Task<List<TagConfig>> All(Expression<Func<TagConfig, bool>> exp);

    }
}
